<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>
  Class: Jammit::Controller
  
    &mdash; Jammit
  
</title>

  <link rel="stylesheet" href="../css/style.css" type="text/css" charset="utf-8" />

  <link rel="stylesheet" href="../css/common.css" type="text/css" charset="utf-8" />

<script type="text/javascript" charset="utf-8">
  hasFrames = window.top.frames.main ? true : false;
  relpath = '../';
  framesUrl = "../frames.html#!Jammit/Controller.html";
</script>


  <script type="text/javascript" charset="utf-8" src="../js/jquery.js"></script>

  <script type="text/javascript" charset="utf-8" src="../js/app.js"></script>


  </head>
  <body>
    <div id="header">
      <div id="menu">
  
    <a href="../_index.html">Index (C)</a> &raquo;
    <span class='title'><span class='object_link'><a href="../Jammit.html" title="Jammit (module)">Jammit</a></span></span>
     &raquo; 
    <span class="title">Controller</span>
  

  <div class="noframes"><span class="title">(</span><a href="." target="_top">no frames</a><span class="title">)</span></div>
</div>

      <div id="search">
  
    <a class="full_list_link" id="class_list_link"
        href="../class_list.html">
      Class List
    </a>
  
    <a class="full_list_link" id="method_list_link"
        href="../method_list.html">
      Method List
    </a>
  
    <a class="full_list_link" id="file_list_link"
        href="../file_list.html">
      File List
    </a>
  
</div>
      <div class="clear"></div>
    </div>

    <iframe id="search_frame"></iframe>

    <div id="content"><h1>Class: Jammit::Controller
  
  
  
</h1>

<dl class="box">
  
    <dt class="r1">Inherits:</dt>
    <dd class="r1">
      <span class="inheritName">ActionController::Base</span>
      
        <ul class="fullTree">
          <li>Object</li>
          
            <li class="next">ActionController::Base</li>
          
            <li class="next">Jammit::Controller</li>
          
        </ul>
        <a href="#" class="inheritanceTree">show all</a>
      
      </dd>
    
  
  
    
  
    
  
  
  
    <dt class="r2 last">Defined in:</dt>
    <dd class="r2 last">lib/jammit/controller.rb</dd>
  
</dl>
<div class="clear"></div>

<h2>Overview</h2><div class="docstring">
  <div class="discussion">
    <p>The JammitController is added to your Rails application when the Gem is
loaded. It takes responsibility for /assets, and dynamically packages any
missing or uncached asset packages.</p>

  </div>
</div>
<div class="tags">
  

</div>
  <h2>Constant Summary</h2>
  
    <dl class="constants">
      
        <dt id="VALID_FORMATS-constant" class="">VALID_FORMATS =
          
        </dt>
        <dd><pre class="code"><span class='lbracket'>[</span><span class='symbol'>:css</span><span class='comma'>,</span> <span class='symbol'>:js</span><span class='rbracket'>]</span></pre></dd>
      
        <dt id="SUFFIX_STRIPPER-constant" class="">SUFFIX_STRIPPER =
          
        </dt>
        <dd><pre class="code"><span class='tstring'><span class='regexp_beg'>/</span><span class='tstring_content'>-(datauri|mhtml)\Z</span><span class='regexp_end'>/</span></span></pre></dd>
      
        <dt id="NOT_FOUND_PATH-constant" class="">NOT_FOUND_PATH =
          
        </dt>
        <dd><pre class="code"><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='embexpr_beg'>#{</span><span class='const'>Jammit</span><span class='period'>.</span><span class='id identifier rubyid_public_root'>public_root</span><span class='embexpr_end'>}</span><span class='tstring_content'>/404.html</span><span class='tstring_end'>&quot;</span></span></pre></dd>
      
    </dl>
  







  
    <h2>
      Instance Method Summary
      <small>(<a href="#" class="summary_toggle">collapse</a>)</small>
    </h2>

    <ul class="summary">
      
        <li class="private ">
  <span class="summary_signature">
    
      <a href="#cache_package-instance_method" title="#cache_package (instance method)">- (Object) <strong>cache_package</strong> </a>
    

    
  </span>
  
  
  
  <span class="note title private">private</span>
  
  
  

  
    <span class="summary_desc"><div class='inline'><p>Tells the Jammit::Packager to cache and gzip an asset package.</p></div></span>
  
</li>

      
        <li class="private ">
  <span class="summary_signature">
    
      <a href="#generate_stylesheets-instance_method" title="#generate_stylesheets (instance method)">- (Object) <strong>generate_stylesheets</strong> </a>
    

    
  </span>
  
  
  
  <span class="note title private">private</span>
  
  
  

  
    <span class="summary_desc"><div class='inline'><p>If we&#8217;re generating <span class="caps">MHTML</span>/<span class="caps">CSS</span>, return a stylesheet with the absolute request <span class="caps">URL</span> to the client, and cache a version with the timestamped cache <span class="caps">URL</span> swapped in.</p></div></span>
  
</li>

      
        <li class="public ">
  <span class="summary_signature">
    
      <a href="#package-instance_method" title="#package (instance method)">- (Object) <strong>package</strong> </a>
    

    
  </span>
  
  
  
  
  
  
  

  
    <span class="summary_desc"><div class='inline'><p>The &#8220;package&#8221; action receives all requests for asset packages that haven&#8217;t yet been cached.</p></div></span>
  
</li>

      
        <li class="private ">
  <span class="summary_signature">
    
      <a href="#package_not_found-instance_method" title="#package_not_found (instance method)">- (Object) <strong>package_not_found</strong> </a>
    

    
  </span>
  
  
  
  <span class="note title private">private</span>
  
  
  

  
    <span class="summary_desc"><div class='inline'><p>Render the 404 page, if one exists, for any packages that don&#8217;t.</p></div></span>
  
</li>

      
        <li class="private ">
  <span class="summary_signature">
    
      <a href="#parse_request-instance_method" title="#parse_request (instance method)">- (Object) <strong>parse_request</strong> </a>
    

    
  </span>
  
  
  
  <span class="note title private">private</span>
  
  
  

  
    <span class="summary_desc"><div class='inline'><p>Extracts the package name, extension (:css, :js), and variant (:datauri, :mhtml) from the incoming <span class="caps">URL</span>.</p></div></span>
  
</li>

      
        <li class="private ">
  <span class="summary_signature">
    
      <a href="#prefix_url-instance_method" title="#prefix_url (instance method)">- (Object) <strong>prefix_url</strong>(path) </a>
    

    
  </span>
  
  
  
  <span class="note title private">private</span>
  
  
  

  
    <span class="summary_desc"><div class='inline'><p>Generate the complete, timestamped, <span class="caps">MHTML</span> url &#8212; if we&#8217;re rendering a dynamic <span class="caps">MHTML</span> package, we&#8217;ll need to put one <span class="caps">URL</span> in the response, and a different one into the cached package.</p></div></span>
  
</li>

      
    </ul>
  


  

  <div id="instance_method_details" class="method_details_list">
    <h2>Instance Method Details</h2>

    
      <div class="method_details first">
  <h3 class="signature first" id="cache_package-instance_method">
  
    - (<tt>Object</tt>) <strong>cache_package</strong>  <span class="extras">(private)</span>
  

  

  
</h3><div class="docstring">
  <div class="discussion">
    <p>Tells the Jammit::Packager to cache and gzip an asset package. We can&#8217;t
just use the built-in &#8220;cache_page&#8221; because we need to ensure that
the timestamp that ends up in the <span class="caps">MHTML</span> is also on the cached file.</p>

  </div>
</div>
<div class="tags">
  

</div><table class="source_code">
  <tr>
    <td>
      <pre class="lines">


41
42
43
44</pre>
    </td>
    <td>
      <pre class="code"><span class="info file"># File 'lib/jammit/controller.rb', line 41</span>

<span class='kw'>def</span> <span class='id identifier rubyid_cache_package'>cache_package</span>
  <span class='id identifier rubyid_dir'>dir</span> <span class='op'>=</span> <span class='const'>File</span><span class='period'>.</span><span class='id identifier rubyid_join'>join</span><span class='lparen'>(</span><span class='id identifier rubyid_page_cache_directory'>page_cache_directory</span><span class='comma'>,</span> <span class='const'>Jammit</span><span class='period'>.</span><span class='id identifier rubyid_package_path'>package_path</span><span class='rparen'>)</span>
  <span class='const'>Jammit</span><span class='period'>.</span><span class='id identifier rubyid_packager'>packager</span><span class='period'>.</span><span class='id identifier rubyid_cache'>cache</span><span class='lparen'>(</span><span class='ivar'>@package</span><span class='comma'>,</span> <span class='ivar'>@extension</span><span class='comma'>,</span> <span class='ivar'>@contents</span><span class='comma'>,</span> <span class='id identifier rubyid_dir'>dir</span><span class='comma'>,</span> <span class='ivar'>@variant</span><span class='comma'>,</span> <span class='ivar'>@mtime</span><span class='rparen'>)</span>
<span class='kw'>end</span></pre>
    </td>
  </tr>
</table>
</div>
    
      <div class="method_details ">
  <h3 class="signature " id="generate_stylesheets-instance_method">
  
    - (<tt>Object</tt>) <strong>generate_stylesheets</strong>  <span class="extras">(private)</span>
  

  

  
</h3><div class="docstring">
  <div class="discussion">
    <p>If we&#8217;re generating <span class="caps">MHTML</span>/<span class="caps">CSS</span>, return a stylesheet with the absolute
request <span class="caps">URL</span> to the client, and cache a version with the timestamped cache
<span class="caps">URL</span> swapped in.</p>

  </div>
</div>
<div class="tags">
  

</div><table class="source_code">
  <tr>
    <td>
      <pre class="lines">


57
58
59
60
61
62
63
64
65</pre>
    </td>
    <td>
      <pre class="code"><span class="info file"># File 'lib/jammit/controller.rb', line 57</span>

<span class='kw'>def</span> <span class='id identifier rubyid_generate_stylesheets'>generate_stylesheets</span>
  <span class='kw'>return</span> <span class='ivar'>@contents</span> <span class='op'>=</span> <span class='const'>Jammit</span><span class='period'>.</span><span class='id identifier rubyid_packager'>packager</span><span class='period'>.</span><span class='id identifier rubyid_pack_stylesheets'>pack_stylesheets</span><span class='lparen'>(</span><span class='ivar'>@package</span><span class='comma'>,</span> <span class='ivar'>@variant</span><span class='rparen'>)</span> <span class='kw'>unless</span> <span class='ivar'>@variant</span> <span class='op'>==</span> <span class='symbol'>:mhtml</span>
  <span class='ivar'>@mtime</span>      <span class='op'>=</span> <span class='const'>Time</span><span class='period'>.</span><span class='id identifier rubyid_now'>now</span>
  <span class='id identifier rubyid_request_url'>request_url</span> <span class='op'>=</span> <span class='id identifier rubyid_prefix_url'>prefix_url</span><span class='lparen'>(</span><span class='id identifier rubyid_request'>request</span><span class='period'>.</span><span class='id identifier rubyid_fullpath'>fullpath</span><span class='rparen'>)</span>
  <span class='id identifier rubyid_cached_url'>cached_url</span>  <span class='op'>=</span> <span class='id identifier rubyid_prefix_url'>prefix_url</span><span class='lparen'>(</span><span class='const'>Jammit</span><span class='period'>.</span><span class='id identifier rubyid_asset_url'>asset_url</span><span class='lparen'>(</span><span class='ivar'>@package</span><span class='comma'>,</span> <span class='ivar'>@extension</span><span class='comma'>,</span> <span class='ivar'>@variant</span><span class='comma'>,</span> <span class='ivar'>@mtime</span><span class='rparen'>)</span><span class='rparen'>)</span>
  <span class='id identifier rubyid_css'>css</span>         <span class='op'>=</span> <span class='const'>Jammit</span><span class='period'>.</span><span class='id identifier rubyid_packager'>packager</span><span class='period'>.</span><span class='id identifier rubyid_pack_stylesheets'>pack_stylesheets</span><span class='lparen'>(</span><span class='ivar'>@package</span><span class='comma'>,</span> <span class='ivar'>@variant</span><span class='comma'>,</span> <span class='id identifier rubyid_request_url'>request_url</span><span class='rparen'>)</span>
  <span class='ivar'>@contents</span>   <span class='op'>=</span> <span class='id identifier rubyid_css'>css</span><span class='period'>.</span><span class='id identifier rubyid_gsub'>gsub</span><span class='lparen'>(</span><span class='id identifier rubyid_request_url'>request_url</span><span class='comma'>,</span> <span class='id identifier rubyid_cached_url'>cached_url</span><span class='rparen'>)</span> <span class='kw'>if</span> <span class='id identifier rubyid_perform_caching'>perform_caching</span>
  <span class='id identifier rubyid_css'>css</span>
<span class='kw'>end</span></pre>
    </td>
  </tr>
</table>
</div>
    
      <div class="method_details ">
  <h3 class="signature " id="package-instance_method">
  
    - (<tt>Object</tt>) <strong>package</strong> 
  

  

  
</h3><div class="docstring">
  <div class="discussion">
    <p>The &#8220;package&#8221; action receives all requests for asset packages that haven&#8217;t
yet been cached. The package will be built, cached, and gzipped.</p>

  </div>
</div>
<div class="tags">
  

</div><table class="source_code">
  <tr>
    <td>
      <pre class="lines">


19
20
21
22
23
24
25
26
27
28
29
30
31
32
33</pre>
    </td>
    <td>
      <pre class="code"><span class="info file"># File 'lib/jammit/controller.rb', line 19</span>

<span class='kw'>def</span> <span class='id identifier rubyid_package'>package</span>
  <span class='id identifier rubyid_parse_request'>parse_request</span>
  <span class='id identifier rubyid_template_ext'>template_ext</span> <span class='op'>=</span> <span class='const'>Jammit</span><span class='period'>.</span><span class='id identifier rubyid_template_extension'>template_extension</span><span class='period'>.</span><span class='id identifier rubyid_to_sym'>to_sym</span>
  <span class='kw'>case</span> <span class='ivar'>@extension</span>
  <span class='kw'>when</span> <span class='symbol'>:js</span>
    <span class='id identifier rubyid_render'>render</span> <span class='symbol'>:js</span> <span class='op'>=&gt;</span> <span class='lparen'>(</span><span class='ivar'>@contents</span> <span class='op'>=</span> <span class='const'>Jammit</span><span class='period'>.</span><span class='id identifier rubyid_packager'>packager</span><span class='period'>.</span><span class='id identifier rubyid_pack_javascripts'>pack_javascripts</span><span class='lparen'>(</span><span class='ivar'>@package</span><span class='rparen'>)</span><span class='rparen'>)</span>
  <span class='kw'>when</span> <span class='id identifier rubyid_template_ext'>template_ext</span>
    <span class='id identifier rubyid_render'>render</span> <span class='symbol'>:js</span> <span class='op'>=&gt;</span> <span class='lparen'>(</span><span class='ivar'>@contents</span> <span class='op'>=</span> <span class='const'>Jammit</span><span class='period'>.</span><span class='id identifier rubyid_packager'>packager</span><span class='period'>.</span><span class='id identifier rubyid_pack_templates'>pack_templates</span><span class='lparen'>(</span><span class='ivar'>@package</span><span class='rparen'>)</span><span class='rparen'>)</span>
  <span class='kw'>when</span> <span class='symbol'>:css</span>
    <span class='id identifier rubyid_render'>render</span> <span class='symbol'>:text</span> <span class='op'>=&gt;</span> <span class='id identifier rubyid_generate_stylesheets'>generate_stylesheets</span><span class='comma'>,</span> <span class='symbol'>:content_type</span> <span class='op'>=&gt;</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>text/css</span><span class='tstring_end'>&#39;</span></span>
  <span class='kw'>end</span>
  <span class='id identifier rubyid_cache_package'>cache_package</span> <span class='kw'>if</span> <span class='id identifier rubyid_perform_caching'>perform_caching</span> <span class='op'>&amp;&amp;</span> <span class='lparen'>(</span><span class='ivar'>@extension</span> <span class='op'>!=</span> <span class='id identifier rubyid_template_ext'>template_ext</span><span class='rparen'>)</span>
<span class='kw'>rescue</span> <span class='const'>Jammit</span><span class='op'>::</span><span class='const'>PackageNotFound</span>
  <span class='id identifier rubyid_package_not_found'>package_not_found</span>
<span class='kw'>end</span></pre>
    </td>
  </tr>
</table>
</div>
    
      <div class="method_details ">
  <h3 class="signature " id="package_not_found-instance_method">
  
    - (<tt>Object</tt>) <strong>package_not_found</strong>  <span class="extras">(private)</span>
  

  

  
</h3><div class="docstring">
  <div class="discussion">
    <p>Render the 404 page, if one exists, for any packages that don&#8217;t.</p>

  </div>
</div>
<div class="tags">
  

</div><table class="source_code">
  <tr>
    <td>
      <pre class="lines">


82
83
84
85</pre>
    </td>
    <td>
      <pre class="code"><span class="info file"># File 'lib/jammit/controller.rb', line 82</span>

<span class='kw'>def</span> <span class='id identifier rubyid_package_not_found'>package_not_found</span>
  <span class='kw'>return</span> <span class='id identifier rubyid_render'>render</span><span class='lparen'>(</span><span class='symbol'>:file</span> <span class='op'>=&gt;</span> <span class='const'>NOT_FOUND_PATH</span><span class='comma'>,</span> <span class='symbol'>:status</span> <span class='op'>=&gt;</span> <span class='int'>404</span><span class='rparen'>)</span> <span class='kw'>if</span> <span class='const'>File</span><span class='period'>.</span><span class='id identifier rubyid_exists?'>exists?</span><span class='lparen'>(</span><span class='const'>NOT_FOUND_PATH</span><span class='rparen'>)</span>
  <span class='id identifier rubyid_render'>render</span> <span class='symbol'>:text</span> <span class='op'>=&gt;</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>&lt;h1&gt;404: \&quot;</span><span class='embexpr_beg'>#{</span><span class='ivar'>@package</span><span class='embexpr_end'>}</span><span class='tstring_content'>\&quot; asset package not found.&lt;/h1&gt;</span><span class='tstring_end'>&quot;</span></span><span class='comma'>,</span> <span class='symbol'>:status</span> <span class='op'>=&gt;</span> <span class='int'>404</span>
<span class='kw'>end</span></pre>
    </td>
  </tr>
</table>
</div>
    
      <div class="method_details ">
  <h3 class="signature " id="parse_request-instance_method">
  
    - (<tt>Object</tt>) <strong>parse_request</strong>  <span class="extras">(private)</span>
  

  

  
</h3><div class="docstring">
  <div class="discussion">
    <p>Extracts the package name, extension (:css, :js), and variant (:datauri,
:mhtml) from the incoming <span class="caps">URL</span>.</p>

  </div>
</div>
<div class="tags">
  
<p class="tag_title">Raises:</p>
<ul class="raise">
  
    <li>
      
      
        <span class='type'>(<tt><span class='object_link'><a href="PackageNotFound.html" title="Jammit::PackageNotFound (class)">PackageNotFound</a></span></tt>)</span>
      
      
      
    </li>
  
</ul>

</div><table class="source_code">
  <tr>
    <td>
      <pre class="lines">


69
70
71
72
73
74
75
76
77
78
79</pre>
    </td>
    <td>
      <pre class="code"><span class="info file"># File 'lib/jammit/controller.rb', line 69</span>

<span class='kw'>def</span> <span class='id identifier rubyid_parse_request'>parse_request</span>
  <span class='id identifier rubyid_pack'>pack</span>       <span class='op'>=</span> <span class='id identifier rubyid_params'>params</span><span class='lbracket'>[</span><span class='symbol'>:package</span><span class='rbracket'>]</span>
  <span class='ivar'>@extension</span> <span class='op'>=</span> <span class='id identifier rubyid_params'>params</span><span class='lbracket'>[</span><span class='symbol'>:extension</span><span class='rbracket'>]</span><span class='period'>.</span><span class='id identifier rubyid_to_sym'>to_sym</span>
  <span class='id identifier rubyid_raise'>raise</span> <span class='const'>PackageNotFound</span> <span class='kw'>unless</span> <span class='lparen'>(</span><span class='const'>VALID_FORMATS</span> <span class='op'>+</span> <span class='lbracket'>[</span><span class='const'>Jammit</span><span class='period'>.</span><span class='id identifier rubyid_template_extension'>template_extension</span><span class='period'>.</span><span class='id identifier rubyid_to_sym'>to_sym</span><span class='rbracket'>]</span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_include?'>include?</span><span class='lparen'>(</span><span class='ivar'>@extension</span><span class='rparen'>)</span>
  <span class='kw'>if</span> <span class='const'>Jammit</span><span class='period'>.</span><span class='id identifier rubyid_embed_assets'>embed_assets</span>
    <span class='id identifier rubyid_suffix_match'>suffix_match</span> <span class='op'>=</span> <span class='id identifier rubyid_pack'>pack</span><span class='period'>.</span><span class='id identifier rubyid_match'>match</span><span class='lparen'>(</span><span class='const'>SUFFIX_STRIPPER</span><span class='rparen'>)</span>
    <span class='ivar'>@variant</span> <span class='op'>=</span> <span class='const'>Jammit</span><span class='period'>.</span><span class='id identifier rubyid_embed_assets'>embed_assets</span> <span class='op'>&amp;&amp;</span> <span class='id identifier rubyid_suffix_match'>suffix_match</span> <span class='op'>&amp;&amp;</span> <span class='id identifier rubyid_suffix_match'>suffix_match</span><span class='lbracket'>[</span><span class='int'>1</span><span class='rbracket'>]</span><span class='period'>.</span><span class='id identifier rubyid_to_sym'>to_sym</span>
    <span class='id identifier rubyid_pack'>pack</span><span class='period'>.</span><span class='id identifier rubyid_sub!'>sub!</span><span class='lparen'>(</span><span class='const'>SUFFIX_STRIPPER</span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_end'>&#39;</span></span><span class='rparen'>)</span>
  <span class='kw'>end</span>
  <span class='ivar'>@package</span> <span class='op'>=</span> <span class='id identifier rubyid_pack'>pack</span><span class='period'>.</span><span class='id identifier rubyid_to_sym'>to_sym</span>
<span class='kw'>end</span></pre>
    </td>
  </tr>
</table>
</div>
    
      <div class="method_details ">
  <h3 class="signature " id="prefix_url-instance_method">
  
    - (<tt>Object</tt>) <strong>prefix_url</strong>(path)  <span class="extras">(private)</span>
  

  

  
</h3><div class="docstring">
  <div class="discussion">
    <p>Generate the complete, timestamped, <span class="caps">MHTML</span> url &#8212; if we&#8217;re rendering a
dynamic <span class="caps">MHTML</span> package, we&#8217;ll need to put one <span class="caps">URL</span> in the response, and a
different one into the cached package.</p>

  </div>
</div>
<div class="tags">
  

</div><table class="source_code">
  <tr>
    <td>
      <pre class="lines">


49
50
51
52</pre>
    </td>
    <td>
      <pre class="code"><span class="info file"># File 'lib/jammit/controller.rb', line 49</span>

<span class='kw'>def</span> <span class='id identifier rubyid_prefix_url'>prefix_url</span><span class='lparen'>(</span><span class='id identifier rubyid_path'>path</span><span class='rparen'>)</span>
  <span class='id identifier rubyid_host'>host</span> <span class='op'>=</span> <span class='id identifier rubyid_request'>request</span><span class='period'>.</span><span class='id identifier rubyid_port'>port</span> <span class='op'>==</span> <span class='int'>80</span> <span class='op'>?</span> <span class='id identifier rubyid_request'>request</span><span class='period'>.</span><span class='id identifier rubyid_host'>host</span> <span class='op'>:</span> <span class='id identifier rubyid_request'>request</span><span class='period'>.</span><span class='id identifier rubyid_host_with_port'>host_with_port</span>
  <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_request'>request</span><span class='period'>.</span><span class='id identifier rubyid_protocol'>protocol</span><span class='embexpr_end'>}</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_host'>host</span><span class='embexpr_end'>}</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_path'>path</span><span class='embexpr_end'>}</span><span class='tstring_end'>&quot;</span></span>
<span class='kw'>end</span></pre>
    </td>
  </tr>
</table>
</div>
    
  </div>

</div>

    <div id="footer">
  Generated on Wed Oct 28 12:19:04 2015 by
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
  0.8.7.6 (ruby-2.1.3).
</div>

  </body>
</html>